<?php
namespace Tyrone\Model;
use Medoo\Medoo;

class PlayerKeep extends Base
{
    protected $table = 'c_player_keep';



    public function updateData($items)
    {
        $item = $items[0] ?? [];
        if(!$item) return [];

        $uniqueKey = ['platform','plat_server','day','type'];
        $uniqueData = array_intersect_key($item,array_flip($uniqueKey));
        $update = array_diff_key($item,array_flip($uniqueKey));
        $this->database->batchUpdateOrInsert($this->table,$items,$uniqueKey);

        return $item;
    }





}